package top.skihub.service.impl;


import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.skihub.mapper.AddGoodsMapper;
import top.skihub.mapper.SearchGoodsMapper;
import top.skihub.pojo.Goods;
import top.skihub.service.AddGoodsService;

import java.time.LocalDateTime;
import java.util.List;

@Slf4j
@Service
public class AddGoodsServiceImpl implements AddGoodsService {

    @Autowired
    private AddGoodsMapper addGoodsMapper;

    @Override
    public void addGoods(Goods goods) {
        log.info("开始添加商品，商品信息: {}", goods);
        goods.setGoodsEnterTime1(LocalDateTime.now());
        addGoodsMapper.insert(goods);
        log.info("商品添加成功，商品 ID: {}", goods.getId());
    }
}

